package com.wicket.okrpbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrpbff.biz.service.DeploymentService;
import com.wicket.okrpbff.biz.service.dto.req.*;
import com.wicket.okrpbff.biz.service.dto.res.*;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okroperation.integration.dto.JudgeDataSeparationRespDto;
import com.wicket.okroperation.integration.dto.JudgeDataSeparationReqDto;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okroperation.integration.dto.UpdateDataSeparationRespDto;
import com.wicket.okroperation.integration.dto.UpdateDataSeparationReqDto;
import com.wicket.okroperation.integration.dto.QueryDataSeparationListRespDto;
import com.wicket.okroperation.integration.dto.QueryDataSeparationListReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordComReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okroperation.integration.dto.QueryDataSeparationDetailRespDto;
import com.wicket.okroperation.integration.dto.QueryDataSeparationDetailReqDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Deployment", tags = { "Deployment" })
@RestController
// @RequestMapping("/poms/deployment/")
public class DeploymentController {

  @Autowired
  DeploymentService deploymentService;
/**
   * B6判断数据分离(管理)
   * gen by moon at 9/13/2023, 10:45:04 PM
   */
    @PostMapping("/oms/platform/operation/mgt/deployment/judgeDataSeparation")
    @ApiOperation(value = "B6判断数据分离(管理)", response = OkrResult.class)
    public OkrResult<BffJudgeDataSeparationRespDto> judgeDataSeparation(@RequestBody(required=false) @Validated BffJudgeDataSeparationReqDto reqDTO){
        return OkrResult.success(deploymentService.judgeDataSeparation(reqDTO));
    }
/**
   * B6修改数据分离(管理)
   * gen by moon at 9/13/2023, 10:57:07 PM
   */
    @PostMapping("/oms/platform/operation/mgt/deployment/updateDataSeparation")
    @ApiOperation(value = "B6修改数据分离(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateDataSeparationRespDto> updateDataSeparation(@RequestBody(required=false) @Validated BffUpdateDataSeparationReqDto reqDTO){
        return OkrResult.success(deploymentService.updateDataSeparation(reqDTO));
    }
/**
   * B6查询数据分离列表(管理)
   * gen by moon at 9/13/2023, 10:57:10 PM
   */
    @PostMapping("/oms/platform/operation/mgt/deployment/queryDataSeparationList")
    @ApiOperation(value = "B6查询数据分离列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryDataSeparationListRespDto> queryDataSeparationList(@RequestBody(required=false) @Validated BffQueryDataSeparationListReqDto reqDTO){
        return OkrResult.success(deploymentService.queryDataSeparationList(reqDTO));
    }
/**
   * B6查询数据分离详情(管理)
   * gen by moon at 9/13/2023, 10:57:12 PM
   */
    @PostMapping("/oms/platform/operation/mgt/deployment/queryDataSeparationDetail")
    @ApiOperation(value = "B6查询数据分离详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryDataSeparationDetailRespDto> queryDataSeparationDetail(@RequestBody(required=false) @Validated BffQueryDataSeparationDetailReqDto reqDTO){
        return OkrResult.success(deploymentService.queryDataSeparationDetail(reqDTO));
    }
}
